<div class="alert alert-success"><span class="glyphicon glyphicon-info-sign"></span> 确认所有菜单添加完成后点击发布。<a id="btn_publish" class="btn btn-info" href="#">发布菜单</a></div>
<table class="table table-hover">
	<thead>
		<tr>
			<th>ID</th>
			<th>菜单类型</th>
			<th>菜单名称</th>
			<th>排列序号</th>
			<th width="45%">链接地址</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<volist name="wechatMenuLists" id="vo">
			<tr>
				<td>{$vo.id}</td>
				<td>{$vo["pid"]?"二级菜单":"顶级菜单"}</td>
				<td>{$vo.name}</td>
				<td>{$vo.sort}</td>
				<td style="word-break: break-all; word-wrap:break-word;">{$vo.url}</td>
				<td>
					<a class="btn btn-primary btn-xs" href="__CONTROLLER__/modify/id/{$vo.id}">修改</a>
					<a class="btn btn-danger btn-xs actionds" data-action-id="{$vo.id}" data-action-txt="移除中……" data-action-url="__CONTROLLER__/removePost">移除</a>
				</td>
			</tr>
		</volist>
	</tbody>
</table>
<div class="pagination">{$pagination}</div>

<script type="text/javascript">
$("#btn_publish").click(function() {
	if ( confirm("确定要发布吗，发布成功后2小时内将不能再发布!") ) {
		$.post('/index.php/My/WechatMenu/publishMenu', {}, function(data) {
			alert(data['msg']);
		});
	}
	return false;
});
</script>
